/*
 * 文件名: Department.java
 * 包路径: com.thx.addressList.model
 * 创建描述
 *        创建人：张衡
 *        创建日期：2014年4月22日 下午3:07:44
 *        内容描述：
 * 修改描述
 *        修改人：张衡
 *        修改日期：2014年4月22日 下午3:07:44
 *        修改内容:
 * 版本: V1.0
 */
/*
 * 文件名: Department.java
 * 包路径: com.thx.addressList.model
 * 创建描述
 *        创建人：张衡
 *        创建日期：2014年4月22日 下午3:07:44
 *        内容描述：
 * 修改描述
 *        修改人：张衡
 *        修改日期：2014年4月22日 下午3:07:44
 *        修改内容:
 * 版本: V1.0
 */
package com.thx.org.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.thx.common.orm.model.ExtendPropertyEntity;
import com.thx.org.Org;
import com.thx.user.model.User;

/**
 *
 * 类: <code> Department </code><br/>
 * 功能描述: 部门实体类<br/>
 * 创建人: 张衡 <br/>
 * 创建日期: 2014年4月22日 下午3:44:10 <br/>
 */

@Entity
@Table(name = "org_department")
public class Department extends ExtendPropertyEntity implements Org {

	private static final long serialVersionUID = -6471547867759851152L;

	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "uuid")
	private String depId;
	private String depName;//部门名称
	private String fullName;//部门全名
	private String pinyin;//拼音
	private String deptDesc;// 部门描述
	private String deptCode;// 部门编号
	private String deptRank;// 部门级别
	private String deptProvince;// 所在省
	private String deptCity;// 所在城市
	private String deptRegion;// 所在区县
	private int orderSeq;//排序
	private String parentId;//父部门id
	private String deleted;//删除状态  0：未删   1：已删
	private String comId;//企业id
	private Date creatTime;//创建日期

	@Column(name = "creater_")
	private String creater;//创建人

	private Date changeTime;//修改日期

	@Column(name = "modifier_")
	private String modifier;//修改人

	@OneToMany(mappedBy = "department")
	private Set<User> users = new HashSet<User>();//人员

	@Transient
	private List<Department> children = new ArrayList<Department>();//子部门

	@Transient
	private boolean isParent;//是否父部门   true：是     false：否

	@Column(name = "reserve_1")
	private String reserve1;

	@Column(name = "reserve_2")
	private String reserve2;

	@Column(name = "reserve_3")
	private String reserve3;

	@Column(name = "reserve_4")
	private String reserve4;

	@Column(name = "reserve_5")
	private String reserve5;

	@Column(name = "reserve_6")
	private String reserve6;

	@Column(name = "reserve_7")
	private String reserve7;

	@Column(name = "reserve_8")
	private String reserve8;

	@Column(name = "reserve_9")
	private String reserve9;

	@Column(name = "reserve_10")
	private String reserve10;

	@Override
	public String getOrgId() {
		return depId;
	}

	@Override
	public String getOrgName() {
		return depName;
	}

	/*set get method*/

	public String getDepId() {
		return depId;
	}

	public void setDepId(String depId) {
		this.depId = depId;
	}

	public String getDepName() {
		return depName;
	}

	public void setDepName(String depName) {
		this.depName = depName;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

	public String getDeptDesc() {
		return deptDesc;
	}

	public void setDeptDesc(String deptDesc) {
		this.deptDesc = deptDesc;
	}

	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	public String getDeptRank() {
		return deptRank;
	}

	public void setDeptRank(String deptRank) {
		this.deptRank = deptRank;
	}

	public String getDeptProvince() {
		return deptProvince;
	}

	public void setDeptProvince(String deptProvince) {
		this.deptProvince = deptProvince;
	}

	public String getDeptCity() {
		return deptCity;
	}

	public void setDeptCity(String deptCity) {
		this.deptCity = deptCity;
	}

	public String getDeptRegion() {
		return deptRegion;
	}

	public void setDeptRegion(String deptRegion) {
		this.deptRegion = deptRegion;
	}

	public int getOrderSeq() {
		return orderSeq;
	}

	public void setOrderSeq(int orderSeq) {
		this.orderSeq = orderSeq;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getDeleted() {
		return deleted;
	}

	public void setDeleted(String deleted) {
		this.deleted = deleted;
	}

	public String getComId() {
		return comId;
	}

	public void setComId(String comId) {
		this.comId = comId;
	}

	public Date getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public Date getChangeTime() {
		return changeTime;
	}

	public void setChangeTime(Date changeTime) {
		this.changeTime = changeTime;
	}

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Set<User> getUsers() {
		return users;
	}

	public void setUsers(Set<User> users) {
		this.users = users;
	}

	public List<Department> getChildren() {
		return children;
	}

	public void setChildren(List<Department> children) {
		this.children = children;
	}

	public boolean getIsParent() {
		return isParent;
	}

	public void setIsParent(boolean isParent) {
		this.isParent = isParent;
	}

	public String getReserve1() {
		return reserve1;
	}

	public void setReserve1(String reserve1) {
		this.reserve1 = reserve1;
	}

	public String getReserve2() {
		return reserve2;
	}

	public void setReserve2(String reserve2) {
		this.reserve2 = reserve2;
	}

	public String getReserve3() {
		return reserve3;
	}

	public void setReserve3(String reserve3) {
		this.reserve3 = reserve3;
	}

	public String getReserve4() {
		return reserve4;
	}

	public void setReserve4(String reserve4) {
		this.reserve4 = reserve4;
	}

	public String getReserve5() {
		return reserve5;
	}

	public void setReserve5(String reserve5) {
		this.reserve5 = reserve5;
	}

	public String getReserve6() {
		return reserve6;
	}

	public void setReserve6(String reserve6) {
		this.reserve6 = reserve6;
	}

	public String getReserve7() {
		return reserve7;
	}

	public void setReserve7(String reserve7) {
		this.reserve7 = reserve7;
	}

	public String getReserve8() {
		return reserve8;
	}

	public void setReserve8(String reserve8) {
		this.reserve8 = reserve8;
	}

	public String getReserve9() {
		return reserve9;
	}

	public void setReserve9(String reserve9) {
		this.reserve9 = reserve9;
	}

	public String getReserve10() {
		return reserve10;
	}

	public void setReserve10(String reserve10) {
		this.reserve10 = reserve10;
	}

  @Override
  public Serializable getId() {
    return this.depId;
  }

}
